package cn.starrysky108.simpleerp.product.entity;

import cn.starrysky108.simpleerp.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * <p>
 * 商品SKU表
 * </p>
 *
 * @author Carl Lee
 * @since 2021-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("product_sku")
@ApiModel(value = "ProductSku对象", description = "商品SKU表")
public class ProductSku extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "商品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "促销价格")
    @TableField("promotion_price")
    private BigDecimal promotionPrice;

    @ApiModelProperty(value = "进价")
    @TableField("purchasing_price")
    private BigDecimal purchasingPrice;

    @ApiModelProperty(value = "商品展示照片(;分割)")
    @TableField("photos")
    private String photos;

    @ApiModelProperty(value = "特有规格属性在spu属性模板中的对应下标组合")
    @TableField("indexes")
    private String indexes;

    @ApiModelProperty(value = "sku的特有规格参数，json格式")
    @TableField("own_spec")
    private String ownSpec;

    @ApiModelProperty(value = "可销售库存")
    @TableField("sales_inventory")
    private Integer salesInventory;

    @ApiModelProperty(value = "活动可销售库存=<sales_inventory>")
    @TableField("activity_inventory")
    private Integer activityInventory;

    @ApiModelProperty(value = "销量")
    @TableField("sale_count")
    private Integer saleCount;

    @ApiModelProperty(value = "营业额")
    @TableField("revenue")
    private BigDecimal revenue;

    @ApiModelProperty(value = "是否上架，默认true")
    @TableField("is_on_sale")
    private Boolean isOnSale;



}
